<template>
  <swiper>
    <swiper-item v-for="item in banners" :key="item.index">
      <a :href="item.link"><img :src="item.image" @load="swiperImageLoad" /></a>
    </swiper-item>
  </swiper>
</template>

<script>
import { Swiper, SwiperItem } from "components/common/swiper";
export default {
  data(){
    return {
      isLode:false
    }
  },
  props: {
    banners: {
      type: Array,
      default() {
        return [];
      },
    },
  },
  methods: {
    swiperImageLoad() {
      if(!this.isLode)
      this.$emit("swiperImageLoad");
      this.isLode = true;
    },
  },
  components: {
    SwiperItem,
    Swiper,
  },
};
</script>

<style>
</style>